<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button class="btn1">图片一</button>
    <button class='btn2'>图片二</button>
    <img src='images/floor-1-2.png' alt='' title='pic1'>
    <script>
        var btn1 = document.querySelector('btn1');
        var btn2 = document.querySelector('btn2');
    </script>

</body>

</html>